package com.study;

/**
 * @author study
 * @version 1.0
 * @date 2020/9/13 22:08
 */
public class LambdaExpressDemo02 {

    public static void main(String[] args) {

        //拷贝小括号，写死右箭头，，落地大括号
        Foo foo = () -> {
            System.out.println("方法执行");
        };

        foo.sayHello();

        Foo2 foo2 = (int x, int y) -> {
            return x + y;
        };
        System.out.println(foo2.sum(3, 4));
    }

}

interface Foo2 {
    public int sum(int x, int y);
}

interface Foo {
    public void sayHello();

    public static int div(int x, int y) {
        return x / y;
    }
}

